package com.ss.android.browser.base.wrapper.net;

import com.bytedance.retrofit2.Callback;
import com.bytedance.retrofit2.ResponseWrapper;

public abstract class c implements Callback {
    public c() {

    }

    public final void onCacheResponse(ResponseWrapper response) {
        if(response != null) {
            if(response.rawResponse.status >= 200 && response.rawResponse.status < 300 && response.body != null) {
                if(response.body != null) {
                    this.a(response.body);
                }
                else {
                    this.b(new Exception("数据为空"));
                }

                return;
            }

            this.b(new Exception("网络请求失败"));
        }
    }

    public abstract void a(Object arg1);

    public final void onErrorResponse(Throwable throwable) {
        this.b(new Exception("网络异常"));
    }

    public abstract void b(Throwable arg1);
}

